﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace ShoppingList.DTO
{
    public class Article : Entity
    {
        private string name;
        private bool isFave;
        private Category category;

        public string Name
        {
            get { return name; }
            set
            {
                name = value;
                OnPropertyChanged("Name");
            }
        }

        public bool IsFave
        {
            get { return isFave; }
            set
            {
                if (isFave != value)
                {
                    isFave = value;
                    OnPropertyChanged("IsFave");
                }
            }
        }

        public Category Category
        {
            get { return category; }
            set
            {
                if (category != value)
                {
                    category = value;
                    OnPropertyChanged("Category");
                }
            }
        }

        public Article()
            : base()
        {
        }

        public Article(int id, string name, Category category, bool isFave)
            : base()
        {
            this.isFave = isFave;
            this.category = category;
            this.id = id;
            this.name = name;
        }
    }
}
